home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / PostScript Extension Shell ƒ / PS Extension.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  2.3 KB  |  78 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: PS Extension.h
  4.  
  5.     C header file for a printing extension.
  6.  
  7.     Dave Hersey
  8.     Apple Developer Technical Support
  9.  
  10.     (Based on the "Extension Shell" sample.)
  11.  
  12.     12/01/92 - dmh - Created.
  13.      4/26/93 - dmh - Updated to use recommended approach
  14.                       to global data initialization.
  15.      9/05/93 - dmh - Updated for b2.
  16.                     - Fixed minor problem with highlighting
  17.                      of editText panel items.
  18.                    - Switched to Exception.h assertion stuff
  19.                      for error checking.
  20.      9/08/93 - dmh - Modified to override
  21.                       GXPostScriptDoPageSetup.
  22.                    - Added a "PS " before the file names.
  23.                    - Changed creator type.
  24.     12/18/93 - dmh - Updated for b3.
  25.      3/22/94 - dmh - Updated for b4.
  26.  
  27.     (Note: labels are in the Mark menu.)
  28.     
  29. __________________________________________________________*/
  30.  
  31. #include <Types.h>
  32. #include <Errors.h>
  33. #include <Resources.h>
  34. #include <ToolUtils.h>
  35. #include <math routines.h>
  36. #include <GXExceptions.h>
  37. #include <graphics routines.h>
  38. #include <graphics toolbox.h>
  39. #include <Collections.h>
  40. #include <Messages.h>
  41. #include <PrintingDrivers.h>
  42. #include <PrintingManager.h>
  43. #include <PrintingMessages.h>
  44.  
  45.  
  46. #define kCreator                    'GPxt'            /* Our creator type.            */
  47. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  48.  
  49. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  50. #define kExtensionTurnedOff            0                /* We're turned on.                */
  51. #define kExtensionTurnedOn            1                /* We're turned off.            */
  52.  
  53. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  54.  
  55.  
  56. typedef struct ExtensionCollection                    /* This is our collection type.    */
  57. {
  58.     char    extTurnedOn;                            /* On/off panel item value.        */
  59.     char    fillByte;
  60. } ExtensionCollection;
  61.  
  62.  
  63. // Prototypes:
  64.  
  65. extern    long A5Size (void);                            /* We need these to set up        */
  66. extern    void A5Init (void *);                        /* our A5 world.                */
  67.  
  68. OSErr    InitGlobalData(void);
  69. OSErr    NewInitialize(void);
  70. OSErr    NewShutDown(void);
  71. OSErr    NewPSDoPageSetup(gxFormat aFormat, long pageNum,
  72.                          gxPostScriptImageDataHdl aDataHdl);
  73. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  74. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  75. OSErr    SetUpPrintPanel(void);
  76. OSErr    GetJobCollectionItem(void *collectItem, long *collectSize,
  77.                              OSType collectType, short collectID);
  78.